LEDCLK EQU P1.5
LEDDTA EQU P1.6
LEDCS  EQU P1.7
	ORG 0000H
	AJMP MAIN

	ORG 0030H
MAIN:	SETB LEDCS
	MOV 40H,#1
	MOV 41H,#2
	MOV 42H,#3
	MOV 43H,#4
	MOV 44H,#5
	MOV 45H,#6
	
	MOV R7,#06H
	MOV R0,#40H
NEXT:	MOV A,@R0
	CALL DOUT
	INC R0
	DJNZ R7,NEXT
	CLR LEDCS
	AJMP MAIN
	
DOUT:	MOV DPTR,#TAB
	MOVC A,@A+DPTR
	JNB 00H,NDOT
	CLR ACC.7
NDOT:	MOV R6,#08H
CYC:	RRC A
	MOV LEDDTA,C
	CLR LEDCLK
	NOP
	NOP
	SETB LEDCLK
	DJNZ R6,CYC
	RET

TAB:    DB 0C0H,0F9H,0A4H,0B0H,99H,92H,82H,0F8H,80H,90H,0FFH
	
	END
	